<!--
  Generated template for the MorePage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>

    <ion-navbar>
        <ion-title>更多</ion-title>
    </ion-navbar>

</ion-header>


<ion-content>
    <div *ngIf="notLogin">
        <ion-card no-margin>
            <ion-card-header text-center>
                登录iMcocQA,体验更多功能
            </ion-card-header>
            <ion-card-content text-center no-margin>
                <button ion-button outline small (click)="showModal()">登录/注册</button>
            </ion-card-content>
        </ion-card>
    </div>
    <div *ngIf="logined">
        <ion-list class="margiTop">
            <button (click)="gotoUserPage()" ion-item>
                <ion-avatar item-start>
                    <img src="{{headface}}">
                </ion-avatar>
                <h2>{{userinfo?.UserNickName}}</h2>
                <p>查看个人主页或者编辑简介</p>
            </button>
        </ion-list>
        <ion-list class="margiTop">
            <ion-list-header>
                我的慕课
            </ion-list-header>
            <button (click)="gotoDataList('question')" ion-item>
                <ion-icon name="paper" item-start color="primary"></ion-icon>
                <ion-label>我的提问</ion-label>
            </button>
            <button (click)="gotoDataList('favourite')" ion-item>
                <ion-icon name="paper" item-start color="orange"></ion-icon>
                <ion-label>我的关注</ion-label>
            </button>
            <button (click)="gotoDataList('answer')" ion-item>
                <ion-icon name="paper" item-start color="secondary"></ion-icon>
                <ion-label>我的回答</ion-label>
            </button>
        </ion-list>
        <ion-list class="margiTop">
            <ion-list-header>
                设置
            </ion-list-header>
            <ion-item>
                <ion-icon name="cloudy-night" item-start color="purple"></ion-icon>
                <ion-label>夜间模式</ion-label>
                <ion-toggle color="purple" (ionChange)="toggleChangeTheme()"></ion-toggle>
            </ion-item>
            <button (click)="gotoScanQRCode()" ion-item>
                <ion-icon name="qr-scanner" item-start color="dark"></ion-icon>
                <ion-label>扫码二维码</ion-label>
            </button>
            <button (click)="gotoDataList('answer')" ion-item>
                <ion-icon name="paper" item-start color="secondary"></ion-icon>
                <ion-label>我的回答</ion-label>
            </button>
        </ion-list>
    </div>
</ion-content>